﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using Data;
using Business;
namespace WebBanDT.UserControl
{
    public partial class DangKy : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        UserInfor info;
        ThemUser tu;
        protected void btnLuu_Click(object sender, EventArgs e)
        {
            string ckn = ConfigurationManager.ConnectionStrings["moketnoi"].ConnectionString;
            DataProvider.ConnectionString = ckn;
            info = new UserInfor();
            info.Email = txtEmai.Text;
            info.Hoten = txtHoTen.Text;
            info.Diachi = txtDiaChi.Text;
            info.Matkhau = txtMatKhau.Text;
            info.Sodt = txtSoDT.Text;
            info.Sofax = txtSoFax.Text;
            info.Makieund = 2;
            tu = new ThemUser();
            tu.Themnguoidung(info.Email, info.Matkhau, info.Hoten, info.Diachi, info.Sodt, info.Sofax, info.Makieund);
            lblThongBao.Text = "Lưu thành công";
        }
    }
}